﻿using System.Windows;
using NColony.Dependencies.Contracts;
using System.ComponentModel.Composition;
using NColony.Syndication.Receiver.Contracts;
using NColony.Client.Wpf.ViewModels.Contracts;

namespace NColony.Client.Wpf
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application, IPartImportsSatisfiedNotification
    {
        [Import("RootVisual", typeof(Window))]
        public Window RootVisual { get; set; }

        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            DependencyManagerFactory.DependencyManager.ResolveDependencies(this);
        }

        public void OnImportsSatisfied()
        {
            this.RootVisual.Show();
        }
    }
}
